<?php $this->load->view('includes/assets/header'); ?>
<div class="loginHeaderBox">
	<div class="logintext">
		<h1>Bienvenidos a TERRA FOOD </h1>
	</div>
</div>
			<?php
				if(validation_errors())
				{
					echo validation_errors('<p class="message_red">', '</p>');
				}
			?>
	<div id="login">
		<div class="loginBox">
			<?php
				if(!$this->session->userdata('is_logged_in')) :
			?>
			
			<?php
				echo form_open('login/validate_credentials');
				
			?>
			<div class="input-label">
				<?php
					$rut = array(
						'id' => 'username',
						'name' => 'username',
						'maxlength' => '25',
						'class' => 'username text'
					);
				?>
				<div class="label">
				<?php
					echo form_label('Nombre de Usuario', 'username');
					
				?>
				</div>
				<?php
					echo form_input($rut);
				?>
				<span>Olvidaste tu contrase&ntilde;a&#63;</span><?php echo anchor('login/forgotPass', 'Haz click aqu&iacute;', 'class="forgotPass"'); ?>
			</div>
			<div class="input-label">
			<?php
				$pass = array(
					'id' => 'password',
					'name' => 'password',
					'maxlength' => '100',
					'class' => 'pass text'
				);
			?>
				<div class="label">
			<?php
				echo form_label('Contrase&ntilde;a', 'password');
			?>
				</div>
			<?php
				echo form_password($pass);
			?>
			</div>
			<div class="input-label">
			<?php
				echo form_submit('login', 'Ingresar', 'class="blue-pill float-right"');
			?>
			</div>
			<?php
				echo form_close();
			?>
			<?php if(validation_errors()): ?>
				<?php  echo validation_errors('<div class="message_red">', '</div>'); ?>
			<?php endif; ?>
			
			<?php
			endif;
			?>
		</div>
	</div>
	
<?php $this->load->view('includes/assets/footer'); ?>